package com.education.service.trade.feign;

import com.education.result.R;
import com.education.service.trade.feign.fallback.UcenterMemberServiceFallBack;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 模拟远程调用 - 根据会员ID查询会员信息
 * Created by Lance on 2020/07/09 16:54
 */
@Service
@FeignClient(value = "online-education-service-ucenter", fallback = UcenterMemberServiceFallBack.class)
public interface UcenterMemberService {

    /**
     * 根据会员ID查询会员信息 - 远程调用
     * @param memberId
     * @return
     */
    @GetMapping("/web/ucenter/member/get-member-dto/{memberId}")
    public R getMemberDtoById(@ApiParam(value = "会员ID", required = true) @PathVariable String memberId);
}
